package top.yuhaitao.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import top.yuhaitao.cloud.entity.User;

@RestController
public class MovieController {
	@Autowired
	private RestTemplate restTemplate;

	@RequestMapping("/getUserById")
	public User getUserById(Long id) {
		return restTemplate.getForObject("http://springboot-cloud-provider-user/getUserById?id=" + id, User.class);
	}
}
